/*
 * Copyright (C) 2018 Zhejiang xiaominfo Technology CO.,LTD.
 * All rights reserved.
 * Official Web Site: http://www.xiaominfo.com.
 * Developer Web Site: http://open.xiaominfo.com.
 */

package com.github.xiaoymin.map;

import com.github.xiaoymin.map.ext.AmapClient;

/**
 * 项目主类
 * @author <a href="mailto:xiaoymin@foxmail.com">xiaoymin@foxmail.com</a>
 * 2020/09/21 13:06
 * @since:map-client 1.0
 */
public class MapClient {

    private final MapClientConfig mapClientConfig;

    /**
     * 根据开发配置秘钥配置MapClient
     * @param mapClientConfig 开发没有配置
     */
    private MapClient(MapClientConfig mapClientConfig){
        this.mapClientConfig = mapClientConfig;
    }

    /**
     * 根据外部配置进行创建
     * @param mapClientConfig 配置信息
     * @return MapClient实例
     */
    public static MapClient create(MapClientConfig mapClientConfig){
        return new MapClient(mapClientConfig);
    }


    /**
     * 获取高德地图的MapClient
     * @return 高德地图Client
     */
    public AmapClient amapClient(){
        return new AmapClient(this.mapClientConfig);
    }

}
